// JavaScript Document
$package("boc.html");
boc.html.Door = Door;
$do = Door.prototype;
function  Door(id,left,time,temp){
	this.sId = id;
	this.sTime = time;
	this.sTemp = temp;
	this.pullit;
	this.drawit;
	if(document.all){
		themenu = document.getElementById(this.sId).style
		rightboundary = 0
		leftboundary = left
	}else{
		themenu = document.layers.slidemenubar
		rightboundary = left
		leftboundary = 10
	}
	document.getElementById(sId).onmouseover = this.pull;
	document.getElementById(sId).onmouseout = this.draw;
}

$do.pull = function pull(){
	document.getElementById(sId).focus();
	if(window.drawit){
		clearInterval(drawit)
	}
	pullit = setInterval("pullengine()",this.sTime)
}

$do.draw = function draw(){
	clearInterval(pullit)
	drawit = setInterval("drawengine()",this.sTime)
}

$do.pullengine = function pullengine(){
	if(document.all && themenu.pixelLeft < rightboundary){
		themenu.pixelLeft += this.sTemp
	}else if(document.layers && themenu.left < rightboundary){
		themenu.left += this.sTemp
	}else if(window.pullit){
		clearInterval(pullit)
	}
}

$do.drawengine = function drawengine(){
	if(document.all && themenu.pixelLeft > leftboundary){
		themenu.pixelLeft -= this.sTemp
	}else if(document.layers && themenu.left > leftboundary){
		themenu.left -= this.sTemp
	}else if(window.drawit){
		clearInterval(drawit)
	}
}